Copyright

DataDirect Connect ODBC for Sybase Wire Protocol

© 2002 DataDirect Technologies. All rights reserved.

DataDirect, DataDirect Connect, and SequeLink are registered trademarks, and Client/Server MiddleWare, DataDirect Connect ADO, DataDirect Connect Integrator, DataDirect Connect JDBC, DataDirect Connect ODBC, DataDirect Connect OLE DB, DataDirect Connect Premium, DataDirect Reflector, and DataDirect SequeLink Integrator are trademarks of DataDirect Technologies. All other trademarks are the property of their respective owners.


About Connect ODBC for Sybase Wire Protocol

Connect ODBC for Sybase Wire Protocol (the "Sybase Wire Protocol driver") supports the following Sybase database servers:

•	Sybase Adaptive Server 11.5 and higher

•	Sybase Adaptive Server Enterprise 12.0 and 12.5

The Sybase Wire Protocol driver is supported in the Windows and UNIX environments.

See the README file shipped with your DataDirect product for the file name of the Sybase Wire Protocol driver.


Sybase System 10/11 Driver Requirements
Driver Requirements

There are no client requirements for the Sybase Wire Protocol driver.


Configuring Data Sources

On Windows, data sources are configured and modified through the ODBC Administrator. To configure a Sybase Wire Protocol data source:

1	Start the ODBC Administrator to display list of data sources.

2	If you are configuring an existing data source, select the data source name and click Configure to display the ODBC Sybase Wire Protocol Driver Setup dialog box.

If you are configuring a new data source, click Add to display a list of installed drivers. Select Sybase Wire Protocol and click Finish to display the ODBC Sybase Wire Protocol Driver Setup dialog box.

3	Specify a data source name, a server name, a database name and optionally, a description. Click Apply.

4	Click the Advanced tab to configure optional data source settings. Click Apply.

5	Click Translate to display the Select Translator dialog box, which lists the translators specified in the ODBC Translators section of the system information. DataDirect provides a translator named “OEM to ANSI” that translates your data from the IBM PC character set to the ANSI character set.

Select a translator, then click OK to close this dialog box and perform the translation.

6	Click the Connection tab to configure optional data source settings. Click Apply.

7	Click the Performance tab to configure advanced performance options. Click Apply.

8	Click Test Connect to attempt to connect to the data source using the connection properties specified in the Driver Setup dialog box.

9	Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect to the data source. You can change these defaults by using this procedure to reconfigure your data source. You can override these defaults by connecting to the data source using a connection string with alternate values.


Test Connection

At any point during the configuration process, you can click Test Connect to attempt to connect to the data source using the connection properties specified in the Driver Setup dialog box. A Logon dialog box is displayed. After providing connection information, click OK.

•	If the driver can connect, it releases the connection and displays a "connection established" message. Click OK.

•	If the driver cannot connect because of an improper environment or incorrect connection value, it will display an appropriate error message.

Click OK.


Connecting to a Data Source Using a Logon Dialog
Connecting to a Data Source Using a Logon Dialog Box

Some ODBC applications display a logon dialog box when you are connecting to a data source. In these cases, the data source name has already been specified.

In the Logon dialog box, perform the following steps:

1	In the Network Library field, select the name of the network library. This specifies which network protocol to use. Valid values are Winsock and NamedPipes.

2	In the Network Address field, type the network address, which depends on which network protocol is chosen under Network Library and on the Sybase server. If you have chosen Winsock, specify an IP address as follows: "<servername or IP address>, <port number>".  For example, if your network supports named servers, you may specify an address such as "Sybaseserver, 5000".  You may also specify the IP address directly such as "199.226.224.34, 5000".

If you have chosen NamedPipes as the network protocol, you must specify the pipe address of the server.  For example, "\\machine1\sybase\pipe\query".

3	If required, type your case-sensitive login ID.

4	If required, type your case-sensitive password for the system.

5	In the Database field, type the name of the database you want to access (case-sensitive) or select the name from the Database drop-down list, which displays the names you specified in the ODBC Sybase Wire Protocol Driver Setup dialog box.

6	Click OK to complete the logon and to update the values in the system information.


Connecting to a Data Source Using a Connection String

If your application requires a connection string to connect to a data source, you must specify the data source name that tells the driver which section in the system information to use for the default connection information. Optionally, you may specify attribute=value pairs in the connection string to override the default values stored in the system information. These values are not written to the system information.

You can specify either long or short names in the connection string. The connection string has the form:

DSN=data_source_name[;attribute=value[;attribute=value]...]

An example of a connection string for Sybase is:

DSN=SYS11 TABLES;SRVR=QESRVR;DB=PAYROLL;UID=JOHN;PWD=XYZZY

The paragraphs that follow give the long and short names for each attribute, as well as a description. The defaults listed are initial defaults that apply when no value is specified in either the connection string or in the data source definition in the system information. If you specified a value for the attribute when configuring the data source, that value is the default.

ApplicationName (APP): The name used by Sybase to identify your application.

ApplicationUsingThreads (AUT): ApplicationUsingThreads={0 | 1}. Ensures that the driver works with multi-threaded applications.

When set to 1 (the initial default), the driver is thread-safe.

When using the driver with single-threaded applications, you can set this option to 0 to avoid additional processing required for ODBC thread-safety standards.

ArraySize (AS): The number of rows the driver retrieves from the server for a fetch. This is not the number of rows given to the user. This increases performance by reducing network traffic.

The initial default is 50 rows.

Charset (CS): The name of a character set. This character set must be installed on the Sybase server. The default is the setting on the Sybase server. For this driver to support Unicode, this attribute must be set to UTF-8. Refer to the Sybase server documentation for a list of valid character set names.

CursorCacheSize (CCS): The number of connections that the connection cache can hold. To set the connection cache, you must set the SelectMethod attribute to 1. Increasing the connection cache may increase performance of some applications but requires additional database resources.

The initial default is 1 (one cursor).

Database (DB): The name of the database to which you want to connect.

DataSourceName (DSN): A string that identifies a single connection to a Sybase database. Examples include "Accounting" or "Sys10-Serv1."

DefaultLongDataBuffLen (DLDBL): An integer value that specifies, in 1024-byte multiples, the maximum length of data fetched from a TEXT or IMAGE column. You will need to increase this value if the total size of any long data exceeds 1 MB.

The default is 1024.

DistributedTransactionModel (DTM): DistributedTransactionModel={XA Protocol | Native OLE}. Determines which model is used for distributed transaction support. The initial default is XA Protocol.

EnableDescribeParam (EDP): EnableDescribeParam={0 | 1}. Determines whether the ODBC API function SQLDescribeParam is enabled.

When set to 0 (the initial default), SQLDescribeParam is disabled.

When set to 1, SQLDescribeParam is enabled, which allows an application to describe parameters in SQL statements and in stored procedure calls. To use this option, OptimizePrepare must be set to 0 or 1, and the SQL statement must not include long parameters. This attribute should be set to 1 when using Microsoft Remote Data Objects (RDO) to access data.

EnableQuotedIdentifiers (EQI): EnableQuotedIdentifiers={0 | 1}. Enables quoted identifiers.

When set to 0 (the initial default), quoted identifiers are disabled.

When set to 1, quoted identifiers are enabled.

FailoverNetworkAddress (FNA): Specifies the address of the High Availability (HA) Failover server to be used in the event of a connection loss. The driver detects the dropped connection and automatically reconnects to the HA Failover server specified by this attribute. This attribute is valid only for Sybase version 12 or higher servers that have the High Availability Failover feature enabled.

See the previous description of the Network Address attribute for an explanation of valid values.

InitializationString (IS): InitializationString={Sybase set commands;...}. Supports the execution of Sybase commands at connect time. Multiple commands must be separated by semicolons.

Language (LANG): The national language. This language must be installed on the Sybase server.

The initial default is English.

LogonID (UID): The default logon ID used to connect to your Sybase database. This ID is case-sensitive. A logon ID is required only if security is enabled on your database. If so, contact your system administrator to get your logon ID.

Network Address (NA): The network address depends on which network protocol is chosen under Network Library Name and on the Sybase server. If you have chosen Winsock, specify an IP address as follows: "servername or IP address, port number". For example, if your network supports named servers, you may specify an address such as "Sybaseserver, 5000". You may also specify the IP address directly such as "199.226.224.34, 5000".

If you have chosen NamedPipes as the network protocol, you must specify the pipe address of the server. For example, "\\machine1\sybase\pipe\query".

Network Library Name (NLN): NetworkLibraryName={Winsock | NamedPipes}. The name of the network library. This specifies which network protocol to use.

The initial default is Winsock.

OptimizePrepare (OP): OptimizePrepare={0 | 1 | 2 | 3}. Determines whether stored procedures are created on the server for calls to SQLPrepare.

When set to 0, stored procedures are created for every call to SQLPrepare. This setting can result in decreased performance when processing statements that do not contain parameters.

When set to 1 (the initial default), the driver creates stored procedures only if the statement contains parameters. Otherwise, the statement is cached and run directly at the time of SQLExecute.

When set to 2, stored procedures are never created.  The driver caches the statement, executes it directly at the time of SQLExecute, and reports any syntax or similar errors at the time of SQLExecute.

When set to 3, stored procedures are never created. This is identical to value 2 except that any syntax or similar errors are returned at the time of SQLPrepare instead of SQLExecute. Use this setting only if you must have syntax errors reported at the time of SQLPrepare.

PacketSize (PS): PacketSize={-1 | 0 | x}. Determines the number of bytes per network packet transferred from the database server to the client. The correct setting of this attribute can improve performance.

When set to -1, the driver computes the maximum allowable packet size on the first connect to the data source and saves the value in the system information.

When set to 0 (the initial default), the driver uses the default packet size as specified in the Sybase server configuration.

When set to x, an integer from 1 to 1024, the driver uses a packet size represented by x times 512 bytes. For example, PacketSize=6 means to set the packet size to 6 * 512 bytes (3072 bytes).

To take advantage of this connection attribute, you must configure the Sybase server for a maximum network packet size greater than or equal to the value you specified for PacketSize. For example:

sp_configure "maximum network packet size", 5120

reconfigure

Restart Sybase Server

NOTE: The ODBC specification specifies a connect option, SQL_PACKET_SIZE, that offers this same functionality. To avoid conflicts with applications that may set both the connection string attribute and the ODBC connect option, they have been defined as mutually exclusive. If PacketSize is specified, you will receive a message "Driver Not Capable" if you attempt to call SQL_PACKET_SIZE. If you do not set PacketSize, then application calls to SQL_PACKET_SIZE are accepted by the driver.

Password (PWD): A case-sensitive password.

RaiseErrorPositionBehavior (REPB): RaiseErrorPositionBehavior={0 | 1}. Specifies when the error is returned and where the cursor is positioned when raiserror is encountered.

When set to 0 (the initial default), raiserror is handled separately from surrounding statements. The error is returned when raiserror is processed via SQLExecute, SQLExecDirect, or SQLMoreResults. The result set is empty.

When set to 1 (MS compatible), raiserror is handled with the next statement. The error is returned when the next statement is processed; the cursor is positioned on the first row of subsequent result set. This could result in multiple raiserrors being returned on a single execute.

SelectMethod (SM): SelectMethod={0 | 1}. Determines whether database cursors are used for Select statements.

When set to 0 (the initial default), database cursors are used. In some cases performance degradation can occur when performing large numbers of sequential Select statements because of the amount of overhead associated with creating database cursors.

When set to 1, Select statements are run directly without using database cursors, and the data source is limited to one active statement.

TightlyCoupledDistributedTransactions (TCDT): TightlyCoupledDistributedTransactions={0 | 1}. Determines whether the driver uses tightly coupled distributed transactions when connected to a Sybase version 12 or higher server.

When set to 0, the overall performance of the driver is better, but multiple connections within the same distributed transaction may hang each other because the connections do not obey each other’s locks.

When set to 1 (the initial default), the driver uses this type of transaction and multiple connections within the same distributed transaction do not obey each other’s locks.

This attribute is valid only when the driver is enlisted in a distributed transaction or when it is connected to a Sybase version 12 or higher server. Otherwise, this attribute is ignored.

WorkstationID (WKID): The workstation ID used by the client.


Data Types

The Sybase data types are mapped to the standard ODBC data types as follows:

Sybase	ODBC
binary	SQL_BINARY
bit	SQL_BIT
char	SQL_CHAR
datetime	SQL_TYPE_TIMESTAMP
decimal	SQL_DECIMAL
float	SQL_FLOAT
image	SQL_LONGVARBINARY
int	SQL_INTEGER
money	SQL_DECIMAL
numeric	SQL_NUMERIC
real	SQL_REAL
smalldatetime	SQL_TYPE_TIMESTAMP
smallint	SQL_SMALLINT
smallmoney	SQL_DECIMAL
sysname	SQL_VARCHAR
text	SQL_LONGVARCHAR
timestamp	SQL_VARBINARY
tinyint	SQL_TINYINT
varbinary	SQL_VARBINARY
varchar	SQL_VARCHAR


MTS Support

On Windows, the Sybase Wire Protocol driver can take advantage of Microsoft Transaction Server (MTS) capabilities, specifically, the Distributed Transaction Coordinator (DTC). Refer to the help file of the "MicroSoft Transaction Server SDK" for details.

You can choose between Native OLE and XA protocol distributed transactions by using the DistributedTransactionModel connection string attribute documented in connecting to a data source using a connection string.

To enable distributed transaction in the Sybase server:

1	Assign the dtm_tm_role to each user who will participate in distributed transactions (who will log in to Adaptive Server). You can do this using the sp_role command. For example:

sp_role "grant", dtm_tm_role, user_name

In the open string for resource managers, the specified username must have the dtm_tm_role.

2	Specify a default database other than the master for each user. Sybase cannot start distributed transactions in a master database.


Unicode Support

The Sybase Wire Protocol driver supports Unicode if the Sybase data source you are using to connect to the database is configured to use the UTF-8 character set. The data source is configured to use the UTF-8 character set by either setting the Charset attribute to UTF-8 in the connection string or in the odbc.ini file. See connecting to a data source using a connection string for more information about the Charset attribute.

If the UTF-8 character set is installed, the driver maps the Sybase data types as follows:

Sybase Data Type	Mapped to. . .
Char	SQL_WCHAR
Varchar	SQL_WVARCHAR
Text	SQL_WLONGVARCHAR
This driver supports the Unicode ODBC function calls, called W (Wide) calls (for example, SQLConnectW). These calls are used to accept Unicode datastreams.

Default Unicode Mapping

The default Unicode mapping for an application’s SQL_C_WCHAR variable is:

Platform	Default Unicode Mapping
Windows	UCS-2
AIX	UTF-8
HP-UX	UTF-8
Solaris	UTF-8
Linux	UTF-8
Connection Attributes for Unicode

Two new connection attributes are available to support Unicode. These attributes determine how character data is converted and presented to an application and the database. The connection attributes are:

SQL_ATTR_APP_WCHAR_TYPE (1061)	Sets the SQL_C_WCHAR type for parameter and column binding to the desired unicode type, either SQL_DD_CP_UCS2 or SQL_DD_CP_UTF8. The default is the default Unicode mapping (see the previous section, "Default Unicode Mapping").
SQL_ATTR_DBMS_CODE_PAGE (1062)	Sets the code page type of the database. The main purpose of this attribute is to set the code page type of a database for drivers that cannot determine the database’s code page. The default is SQL_DD_CP_ANSI.

Valid values for the two connection attributes are:

•	SQL_DD_CP_ANSI (ANSI code page)

•	SQL_DD_CP_UCS2 (UCS-2 code page)

•	SQL_DD_CP_UTF8 (UTF-8 code page)

You can set these connection attributes either before or after a connection is made. If the connection attributes are changed after a connection is established, all conversions use the new values.

The driver does not verify that the connection attributes are set only once per connection. Conversions are made based on the current application and database settings.

If the application does not set the SQL_ATTR_DBMS_CODE_PAGE attribute, the driver tries to determine the database’s code page type; if the driver cannot determine the code page type, the driver sets the SQL_ATTR_DBMS_CODE_PAGE attribute to SQL_DD_CP_ANSI. If the application does set the SQL_ATTR_DBMS_CODE_PAGE attribute, the driver, even if it can determine the database’s code page type, does not override the value of the attribute set by the application.

If a driver does not support Unicode, SQLGetConnect Attr and SQLSetConnectAttr return HYC00.

These new connection attributes and their valid values can be found in the file qesqlext.h, which is installed with the driver.


Persisting a Result Set as an XML Data File

This driver allows you to persist a result set as an XML data file with embedded schema. To implement XML persistence, a client application must do the following:

1	Turn on STATIC cursors. For example:

SQLSetStmtAttr (hstmt, SQL_ATTR_CURSOR_TYPE, SQL_CURSOR_STATIC, SQL_IS_INTEGER)

NOTE: A result set can be persisted as an XML data file only if the result set is generated using STATIC cursors. Otherwise, the following error is returned:

Driver only supports XML persistence when using driver’s static cursors.

2	Execute a SQL statement. For example:

SQLExecDirect (hstmt, "Select * from GTABLE", SQL_NTS)

3	Persist the result set as an XML data file. For example:

SQLSetStmtAttr (hstmt, SQL_PERSIST_AS_XML, "c:\temp\GTABLE.XML", SQL_NTS)

NOTE: A new statement attribute is available to support XML persistence, SQL_PERSIST_AS_XML. A client application must call SQLSetStmtAttr with this new attribute as an argument. See the following table for the definition of valid arguments for SQLSetStmtAttr.

Argument	Definition
StatementHandle	The handle of the statement that contains the result set to persist as XML.
Attribute	SQL_PERSIST_AS_XML. This new statement attribute can be found in the file qesqlext.h, which is installed with the driver.
ValuePtr	Pointer to a URL that specifies the full path name of the XML data file to be generated. The directory specified in the path name must exist, and if the specified file name exists, the file will be overwritten.
StringLength	The length of the string pointed to by ValuePtr or SQL_NTS if ValuePtr points to a null terminated string.

A client application can choose to persist the data at any time that the statement is in an executed or cursor positioned state. At any other time, the driver will return the following message:

Function Sequence Error

Using the Windows XML Persistence Demo Tool

On Windows, Connect ODBC is shipped with an XML persistence demo tool. This tool is installed in the Connect ODBC installation directory.

The tool has a graphical user interface and allows you to persist data as an XML data file. To use this tool, take the following steps:

1	From the DataDirect Technologies Connect ODBC 4.10 program group, select XML Persistence Demo. The XML Persistence dialog box appears.

2	First, you must connect to the database. Click Connect. The Select Data Source dialog box appears.

3	You must either select an existing data source or create a new one. Take one of the following actions:

•	Select an existing data source and click OK.

•	Create a new file data source by clicking New. The Create New Data Source dialog box appears. Follow the instructions in the dialog box.

•	Create a new machine data source by clicking the Machine Data Source tab and clicking New. The Create New Data Source dialog box appears. Follow the instructions in the dialog box.

4	After you have connected to a database, type a SQL Select statement in the Query text box of the XML Persistence dialog box. Then, click Persist. The Save As dialog box appears.

5	Specify a name and location for the XML data file that will be created. Then, click OK.

Note that the Status box in the XML Persistence dialog box displays whether or not the action failed or succeeded.

6	Click Disconnect to disconnect from the database.

7	Click Close to exit the tool.


Support for Query Timeout

The Sybase Wire Protocol driver supports the QUERY_TIMEOUT statement attribute on Windows only.


Isolation and Lock Levels Supported

Sybase supports isolation levels 0 (read uncommitted), 1 (read committed, the default), 2 (repeatable read), and 3 (serializable). It supports page-level locking.


ODBC Conformance Level

The API functions supported are listed in Supported ODBC Functions, found in the General Help section of Connect ODBC Help. In addition, the following functions are supported:

•	SQLColumnPrivileges

•	SQLForeignKeys

•	SQLPrimaryKeys

•	SQLProcedureColumns

•	SQLProcedures

•	SQLTablePrivileges

The driver supports the minimum SQL grammar.


Number of Connections and Statements Supported

The Sybase database system supports multiple connections and multiple statements per connection. If SelectMethod=1, Sybase data sources are limited to one active statement in manual commit mode.


General Tab, ODBC Sybase Driver Setup
General Tab, ODBC Sybase Wire Protocol Driver Setup Dialog

Use the ODBC Sybase Wire Protocol Driver Setup dialog to create new Sybase Wire Protocol data sources or configure existing data sources.

Data Source Name: Type a string that identifies this Sybase Wire Protocol data source configuration in the system information. Examples include "Accounting" or "Sys11-Serv1."

Description: Type an optional long description of a data source name. For example, "My Accounting Database" or "System 11 on Server number 1."

Network Library Name: Select the name of the network library. This specifies which network protocol to use. The values are Winsock and NamedPipes. The default is Winsock.

Network Address: Type the network address. The value you specify depends on which network protocol is chosen under Network Library Name and on the Sybase server. If you have chosen Winsock for the Network Library Name, specify an IP address as follows: "<servername or IP address>, <port number>". For example, if your network supports named servers, you may specify an address such as "Sybaseserver, 5000". You may also specify the IP address directly such as "199.226.224.34, 5000".

If you have chosen NamedPipes as the network protocol, you must specify the pipe address of the server. For example, "\\machine1\sybase\pipe\query".

Database Name: Type the name of the database to which you want to connect by default. If you do not specify a value, the default is the database defined by the system administrator for each user.

HA Failover Server Connection Information/Network Address: Type the network address of the High Availability (HA) Failover server to be used in the event of a connection loss. The driver detects the dropped connection and automatically reconnects to the HA Failover server specified by this attribute. This option is valid only for Sybase version 12 or higher servers that have the High Availability Failover feature enabled.

See the previous description of the Network Address option for an explanation of valid values.

Advanced Tab

Displays the Advanced tab, where you can configure optional data source settings, such as initialization string.

Connection Tab

Displays the Connection tab, where you can configure optional data source settings, such as database list.

Performance Tab

Displays the Performance tab, where you can configure advanced performance options, such as select method.

OK

Cancel

Apply

Test Connect


Advanced Tab, ODBC Sybase Driver Setup
Advanced Tab, ODBC Sybase Wire Protocol Driver Setup Dialog

Use the Advanced tab on the ODBC Sybase Wire Protocol Driver Setup dialog box to specify optional settings when you create new Sybase Wire Protocol data sources or configure existing data sources.

Cursor Positioning for raiserror: Select a value of 0 or 1 that specifies when the error is returned and where the cursor is positioned when raiserror is encountered.

When set to 0 (the default), raiserror is handled separately from surrounding statements. The error is returned when raiserror is processed via SQLExecute, SQLExecDirect, or SQLMoreResults. The result set is empty.

When set to 1 (MS compatible), raiserror is handled with the next statement. The error is returned when the next statement is processed; the cursor is positioned on the first row of subsequent result set. This could result in multiple raiserrors being returned on a single execute.

Default Buffer Size for Long Columns (in Kb): Type an integer value that specifies the maximum length of data fetched from a TEXT or IMAGE column. The value must be in multiples of 1024 (for example, 1024, 2048). The default is 1024 KB. You will need to increase this value if the total size of any long data exceeds 1 MB.

Distributed Transaction Model: Select a model to use for distributed transaction support—either XA Protocol or Native OLE.

Initialization String: Enter a semicolon-separated list of Sybase language commands that will be issued immediately after connection.

Enable Quoted Identifiers: Select this check box to allow support of quoted identifiers.

Enable Describe Parameter: Select this check box to enable the SQLDescribeParam function, which allows an application to describe parameters in SQL statements and in stored procedure calls. To use this option, Prepare Method must be set to 0 or 1, and the SQL statement must not include long parameters. This option should be selected when using Microsoft Remote Data Objects (RDO) to access data.

Application Using Threads: Select this check box to ensure that the driver works with multi-threaded applications. You can clear this check box when using the driver with single-threaded applications. Turning off this setting avoids additional processing required for ODBC thread-safety standards.

Tightly Coupled Distributed Transactions: Select this check box to use tightly coupled distributed transactions when connected to a Sybase version 12 or higher server and to ensure that multiple connections within the same distributed transaction do not obey each other’s locks.

When this check box is not selected, the overall performance of the driver is better, but multiple connections within the same distributed transaction may hang each other because the connections do not obey each other’s locks.

This option is valid only when the driver is enlisted in a distributed transaction and when it is connected to a Sybase version 12 or higher server. Otherwise, this option is ignored.

Translate Button

Displays the Select Translator dialog box, where you can translate your data from one character set to another. Choose the OEM to ANSI translator to translate your data from the IBM PC character set to the ANSI character set.

OK

Cancel

Apply

Test Connect


Connection Tab, ODBC Sybase Driver Setup
Connection Tab, ODBC Sybase Wire Protocol Driver Setup Dialog

Use the Connection tab on the ODBC Sybase Wire Protocol Driver Setup dialog box to specify optional settings when you create new Sybase Wire Protocol data sources or configure existing data sources.

Database List: Type the databases that appear in the logon dialog box. Separate the names with commas.

Default Logon ID: Type the default logon ID used to connect to your Sybase database. This ID is case-sensitive. A logon ID is required only if security is enabled for the database you are connecting to. Your ODBC application may override this value or you can override this value in the logon dialog box or connection string.

Workstation ID: Type the workstation ID used by the client.

Application Name: Type the name used by Sybase to identify your application.

Charset: Type the name of a character set. This character set must be installed on the Sybase server. The default is the setting on the Sybase server. For this driver to support Unicode, this attribute must be set to UTF-8. Refer to the Sybase server documentation for a list of valid character set names.

Language: Type the national language. This language must be installed on the Sybase server. The default is English.

OK

Cancel

Apply

Test Connect


Performance Tab, ODBC Sybase Driver Setup
Performance Tab, ODBC Sybase Wire Protocol Driver Setup Dialog

Use the Performance tab on the ODBC Sybase Wire Protocol Driver Setup dialog box to specify optional settings when you create new Sybase Wire Protocol data sources or configure existing data sources.

Select Method: Select a value of 0 or 1 that determines whether database cursors are used for Select statements. When set to 0, the default, database cursors are used; when set to 1, Select statements are run directly without using database cursors. A setting of 1 limits the data source to one active statement.

Prepare Method: Select a value of 0, 1, 2, or 3 that determines whether stored procedures are created on the server for calls to SQLPrepare.

When set to 0, stored procedures are created for every call to SQLPrepare. This setting can result in decreased performance when processing statements that do not contain parameters.

When set to 1 (the initial default), the driver creates stored procedures only if the statement contains parameters. Otherwise, the statement is cached and run directly at the time of SQLExecute.

When set to 2, stored procedures are never created.  The driver caches the statement, executes it directly at the time of SQLExecute, and reports any syntax or similar errors at the time of SQLExecute.

When set to 3, stored procedures are never created. This is identical to value 2 except that any syntax or similar errors are returned at the time of SQLPrepare instead of SQLExecute. Use this setting only if you must have syntax errors reported at the time of SQLPrepare.

Fetch Array Size: Type the number of rows the driver retrieves when fetching from the server. This is not the number of rows given to the user. The default is 50 rows.

Packet Size: Type a value of -1, 0, or x that determines the number of bytes per network packet transferred from the database server to the client. The correct setting of this attribute can improve performance.

When set to -1, the driver computes the maximum allowable packet size on the first connect to the data source and saves the value in the system information.

When set to 0, the default, the driver uses the default packet size as specified in the Sybase server configuration.

When set to x, an integer from 1 to 1024, the driver uses a packet size represented by x times 512 bytes. For example, "6" means to set the packet size to 6 * 512 bytes (3072 bytes).

To take advantage of this connection attribute, you must configure the Sybase server for a maximum network packet size greater than or equal to the value you specified for PacketSize. For example:

sp_configure "maximum network packet size", 5120

reconfigure

Restart Sybase Server

NOTE: The ODBC specification identifies a connect option, SQL_PACKET_SIZE, that offers this same functionality. To avoid conflicts with applications that may set both the connection string attribute and the ODBC connect option, they have been defined as mutually exclusive. If PacketSize is specified, you will receive a message "Driver Not Capable" if you attempt to call SQL_PACKET_SIZE. If you do not set PacketSize, then application calls to SQL_PACKET_SIZE are accepted by the driver.

Connection Cache Size: Type a value that determines the number of connections that the connection cache can hold. The default Connection Cache setting is 1. To set the connection cache, you must set the Select Method option to 1 - Direct. Increasing the connection cache may increase performance of some applications but requires additional database resources.

OK

Cancel

Apply

Test Connect


Logon to Sybase Dialog
Logon to Sybase Wire Protocol Dialog Box

Network Library Name: Select the name of the network library. This specifies which network protocol to use. Valid values are Winsock and NamedPipes.

Network Address: Type the network address, which depends on which network protocol is chosen under Network Library and on the Sybase server. If you have chosen Winsock, specify an IP address as follows: "<servername or IP address>, <port number>".  For example, if your network supports named servers, you may specify an address such as "Sybaseserver, 5000".  You may also specify the IP address directly such as "199.226.224.34, 5000".

If you have chosen NamedPipes as the network protocol, you must specify the pipe address of the server.  For example, "\\machine1\sybase\pipe\query".

Login ID: If required, type your case-sensitive login ID.

Password: If required, type your case-sensitive password for the system.

Database: Type the name of the database you want to access (case-sensitive) or select the name from Database drop-down list, which displays the database names you specified in the ODBC Sybase Wire Protocol Driver Setup dialog box.


Apply Button

Writes the settings you have specified to the system information. These settings remain in effect until you change them in this dialog box. Clicking Cancel does not affect settings that have been applied.


OK Button

Writes the settings you have specified to the system information and closes the dialog box.


Cancel Button

Closes the dialog box without saving settings that have not been applied.


Contacting Technical Support

DataDirect Technologies provides technical support for all registered users of this product, including limited installation support, for the first 30 days. You can register online for your SupportLink user ID and password, which provide access to the password-protected areas of the SupportLink web site, at http://support.datadirect-technologies.com. Select Register on the left toolbar, complete the information on the Register page, and click Submit. Your user ID and password are issued to you by email upon registration.

For support after 30 days, contact us using one of the following methods or purchase further support by enrolling in the SupportLink program. For more information about SupportLink, contact your sales representative.

The DataDirect Technologies web site provides the latest support information through SupportLink Online, our global service network that provides access to support contact details, tools, and valuable information. Our SupportLink users access information using the web and automatic email notification. SupportLink Online includes a knowledge base that allows you to search on keywords for technical bulletins and other information. You also can download product fixes and upgrades for your DataDirect products.

World Wide Web

http://support.datadirect-technologies.com

E-Mail

USA, Canada, Mexico, Australia, and Asia Pacific (except Japan)	datadirect.answerline@datadirect-technologies.com
Japan	jpn.answerline@datadirect.co.jp (beginning March 2002) dd.answerline@merant.co.jp (until March 2002)
All other countries	int.datadirect.answerline@datadirect-technologies.com
Local Telephone Support

Local phone numbers can be found at:

http://support.datadirect-technologies.com/websupport/supportnet/datadirect/
supportnetanswerline.asp

NOTE: You must have a SupportLink user ID and password to access this web site. You can register online for your SupportLink user ID and password at http://support.datadirect-technologies.com. Select Register on the left toolbar, complete the information on the Register page, and click Submit. Your user ID and password are issued immediately and confirmation is sent to you by email.

Answerline support is available 24 hours a day, seven days a week.

Fax Information

Fax US	1 919 461 4527
Fax Int.	+32 (0) 15 32 09 19

Information to Provide

When you contact us, please include this information:

•	The product serial number or a case number. If you do not have a SupportLink contract, we will ask you to speak with a sales representative.

•	Your name and organization. For a first-time call, you may be asked for full customer information, including location and contact details.

•	The version number of your DataDirect product.

•	The type and version of your operating system.

•	Any third-party software or other environment information required to understand the problem.

•	A brief description of the problem, including any error messages that you have received, and the steps preceding the occurrence of the problem. Depending on the complexity of the problem, you may be asked to submit an example so that we can recreate the problem.

•	An assessment of the severity level of the problem.


Windows

•	Windows 98

•	Windows Me

•	Windows NT with Service Pack 5 and higher

•	Windows 2000 with Service Pack 1 and higher

•	Windows XP Home Edition and Professional


UNIX

•	AIX 4.3.3 and higher with the 5.0.2.0 C++ runtime libraries

•	HP-UX 11 and 11i

•	Sun Solaris 7 and 8

•	Linux (Red Hat Linux 6.2, 7.1, and 7.2; Caldera OpenLinux 2.3 and 3.1; SuSE Linux 6.4 and 7.3)